<%@ page language="java" import="java.util.*,com.hs.auth.model.*,com.hs.online.*,com.hs.auth.*,com.hs.core.utils.*" pageEncoding="utf-8"%>
<%
    String pageStr = (String)request.getAttribute("pagestr");
   List datalist = (List)request.getAttribute("datalist");
   String pagenum = (String)request.getAttribute("pagenum");
   String pagecount = (String)request.getAttribute("pagecount");
   
	
   int pagenumInt = Integer.parseInt(pagenum);
   int pagecountInt = Integer.parseInt(pagecount);
   String orderName = (String)request.getAttribute("orderName");
   String orderNum = (String)request.getAttribute("orderNum");  
   
   String allsql = (String)request.getAttribute("allsql");
   String datarange = (String)request.getAttribute("datarange");
   String onesql = (String)request.getAttribute("onesql");
   String issecond = (String)request.getAttribute("issecond");
   String viewtype = (String)request.getAttribute("viewtype");
   String allcount = (String)request.getAttribute("allcount");
   String xiandaicount = (String)request.getAttribute("xiandaicount");
   String gudaicount = (String)request.getAttribute("gudaicount");
   
   
  // int xiandaicount = 0;
  // int gudaicount = 0;
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html >
<head>
<%@ include file="../include1.jsp"%>  
<script src="<%=basePath %>common/javascript/common.js"></script> 
<script>
function downloadfile(pid,type){
   openwindow('<%=basePath%>produce/downloadbookFile.do?pid='+pid+'&type='+type,'0','0','');
}
</script>
</head>
<body>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="summary">
           <input type="hidden"  value="<%=onesql %>" name="onesql" id="onesql"/>  
           <input type="hidden"  value="<%=viewtype %>" name="viewtype" id="viewtype"/>  
           <input type="hidden"  value="<%=datarange %>" name="datarange" id="datarange"/>  
          <% if(null != datalist && datalist.size()>0){ 
      		    for(int i =0;i<datalist.size();i++){
      			    Map dm = (Map)datalist.get(i);
      			    String type = dm.get("type")+""; 
      			    
          %>
          <%if("2".equals(type)){
          		 
           %>
          <tr>
            <th colspan="2"> <input type="checkbox" name="checkbox" id="checkbox" />
              <%=(pagecountInt*(pagenumInt-1))+i+1 %>、<font color="3300CC"><%= StringUtilTool.NULL2Blank((String)dm.get("title"))%>--<%=StringUtilTool.NULL2Blank((String)dm.get("year"))%><%if(!"0".equals(dm.get("fcount")+"")){ %><input onclick="downloadfile('<%=dm.get("ID") %>','<%=dm.get("TYPE") %>');" type="button" value="下载原文" class="downl" /><%} %></font></th>
          </tr>
          <tr>
            <td colspan="2" class="ml_45"><table width="95%" border="0" cellspacing="0" cellpadding="0">
            	<tr>
                  <td width="70"><b>中医病名</b></td>
                  <td><%=StringUtilTool.NULL2Blank((String)dm.get("DISEASENAME")) %></td>
                </tr>
                <tr>
                  <td width="70"><b>西医病名</b></td>
                  <td><%=StringUtilTool.NULL2Blank((String)dm.get("DISEASENAMEN")) %></td>
                </tr>
                <tr>
                  <td width="70"><b>作者</b></td>
                  <td><%=StringUtilTool.NULL2Blank((String)dm.get("author")) %></td>
                </tr>
                <tr>
                  <td><b>作者单位</b></td>
                  <td><%=StringUtilTool.NULL2Blank((String)dm.get("AUTHORUNIT")) %></td>
                </tr>
                <tr>
                  <td><b>出处</b></td>
                  <td><%=StringUtilTool.NULL2Blank((String)dm.get("PERIODICALNAME")) %></td>
                </tr>
                <tr>
                  <td><b>摘要</b></td>
                  <td><%=StringUtilTool.NULL2Blank((String)dm.get("ABSTRACT")) %></td>
                </tr>
                <tr>
                  <td><b>来源库</b></td>
                  <td><font color=red>多囊卵巢综合征现代文献库</font></td>
                </tr>
            </table></td>
          </tr>
          <%}else{  
          
          %>
          <tr>
            <th colspan="2"> 
              <%=(pagecountInt*(pagenumInt-1))+i+1 %>、<font color="990099"><%= StringUtilTool.NULL2Blank((String)dm.get("AUTHOR"))%>--(<%= StringUtilTool.NULL2Blank((String)dm.get("diseasenamen"))%>[<%= StringUtilTool.NULL2Blank((String)dm.get("cc"))%>])<%if(!"0".equals(dm.get("fcount")+"")){ %><input   type="button" value="下载原文" onclick="downloadfile('<%=dm.get("ID") %>','<%=dm.get("TYPE") %>');" class="downl" /><%} %></font></th>
            </tr>
          <tr>
            <td colspan="2" class="ml_45"><table width="95%" border="0" cellspacing="0" cellpadding="0">
            	<tr>
                  <td width="70"><b>中医病名</b></td>
                  <td><%=StringUtilTool.NULL2Blank((String)dm.get("authorunit")) %></td>
                </tr>
                <tr>
                  <td width="70"><b>西医病名</b></td>
                  <td><%=StringUtilTool.NULL2Blank((String)dm.get("title")) %></td>
                </tr>
                <tr>
                  <td width="70"><b>书名</b></td>
                  <td><%=StringUtilTool.NULL2Blank((String)dm.get("AUTHOR")) %></td>
                </tr>
                <tr>
                  <td width="70"><b>出版社</b></td>
                  <td><%=StringUtilTool.NULL2Blank((String)dm.get("YEAR")) %></td>
                </tr>
                <tr>
                  <td><b>作者</b></td>
                  <td><%=StringUtilTool.NULL2Blank((String)dm.get("KEYWORDS")) %></td>
                </tr>
                <tr>
                  <td><b>原文</b></td>
                  <td><%=StringUtilTool.NULL2Blank((String)dm.get("DISEASENAME")) %></td>
                </tr> 
                <tr>
                  <td><b>来源库</b></td>
                  <td><font color=red>多囊卵巢综合征古代文献库</font></td>
                </tr>
            </table></td>
          </tr> 
          <%} %>
          <%}}else{ %>
          <tr>
            <th colspan="2" align=center><font color=red>没有符合查询条件的结果!</font></th>
          </tr>
         <%} %>
        </table>
<div class="page">
    <p>
       <%=pageStr %>
    </p>
    <!-- input name="" type="button" value="全选" class="all_s"/>
    <input name="" type="button" value="清除" class="clear"/>
    <input name="" type="button" value="导出" class="saver"/-->
</div>
</body>
</html>

<script>
 var _parentWin = window.parent;
 _parentWin.document.getElementById('allnum').innerHTML = "共有记录:<font color=red><%=allcount%></font>";
 _parentWin.document.getElementById('xiandaistr').innerHTML = "多囊卵巢综合征现代文献库(<font color=red><%=xiandaicount==null?"0":xiandaicount%></font>)篇";
 _parentWin.document.getElementById('gudaistr').innerHTML = "多囊卵巢综合征古代文献库(<font color=red><%=gudaicount==null?"0":gudaicount%></font>)篇";



</script>
